package com.proj.controller;

import com.proj.bean.Category;
import com.proj.service.IIndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("index")
public class IndexController {

    @Autowired
    IIndexService indexService;

    @RequestMapping("list")
    @ResponseBody
    public List<Category> getCategory() {
        return indexService.getCategory();
    }

}
